#!/bin/sh

set -e

. ./conf.sh
. ./util.sh

if test -z "$1"; then
    echo "Missing package name to remove"
    exit 1
fi

################################################################################

if test -e "$builders_dir_root/$1/devel.files"; then
    remove_files "$builders_dir_root/$1/devel.files"
fi

if test -e "$builders_dir_root/$1/devel.links"; then
    remove_files "$builders_dir_root/$1/devel.links"
fi

if test -e "$builders_dir_root/$1/devel.dirs"; then
    remove_dirs "$builders_dir_root/$1/devel.dirs"
fi

################################################################################

if test -e "$builders_dir_root/$1/runtime.files"; then
    remove_files "$builders_dir_root/$1/runtime.files"
fi

if test -e "$builders_dir_root/$1/runtime.links"; then
    remove_files "$builders_dir_root/$1/runtime.links"
fi

if test -e "$builders_dir_root/$1/runtime.dirs"; then
    remove_dirs "$builders_dir_root/$1/runtime.dirs"
fi
